package com.mwx.baselib.net;

import android.app.Activity;
import android.content.Context;

import com.mwx.baselib.bean.LikeBean;
import com.mwx.baselib.constant.Constant;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.ObservableTransformer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class LikeMusic {
    public static void like(Context constant, String id){
        Map<String,String> map = new HashMap<>();
        map.put("targetId",id);
        NetworkManager.getInstance().getApiService().songLike(map)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread()).subscribe(new DefaultObserver<BaseResponses<LikeBean>>(constant,false) {
                    @Override
                    public void onSuccess(BaseResponses<LikeBean> listBaseResponses) {

                    }

                    @Override
                    public void onNext(BaseResponses<LikeBean> likeBeanBaseResponses) {
                        if (likeBeanBaseResponses.getCode()==200) {
                        }

                    }
                });
    }
}
